<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <link rel="stylesheet" type="text/css" href="../../css/weui.min.css" />
    <link rel="stylesheet" type="text/css" href="../../css/jquery-weui.min.css" />
    <link rel="stylesheet" type="text/css" href="../../css/login.css" />
    <link rel="stylesheet" type="text/css" href="https://at.alicdn.com/t/font_425307_aq150n9pewcj714i.css" />
    <title>登录</title>
    <script src="../../js/jquery-2.1.4.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../js/jquery-weui.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../js/baseConfig.js" type="text/javascript" charset="utf-8"></script>
</head>

<body>
    <!--<div id="header">

		</div>-->
    <div class="weui-cells weui-cells_form" style="margin-top: 0;">
        <div class="weui-cell">
            <div class="weui-cell__hd"><label class="weui-label">账号</label></div>
            <div class="weui-cell__bd">
                <input class="weui-input accountNumber" type="text" placeholder="请输入账号">
            </div>
        </div>
        <div class="weui-cell ">
            <div class="weui-cell__hd">
                <label class="weui-label">密码</label>
            </div>
            <div class="weui-cell__bd">
                <input class="weui-input passWord" type="password" placeholder="请输入密码">
            </div>
        </div>
    </div>
    <div class="forgetPassword">
        <!--<a href="forgetPassword.html">忘记密码</a>-->
    </div>
    <!--<div class="demos-content-padded">
			<a href="javascript:;" class="weui-btn weui-btn_primary">按钮</a>
		</div>-->
    <div class="demos-content-padded">
        <!--<a href="register.html" class="weui-btn weui-btn_mini weui-btn_default Register" style="float: left;">注册</a>-->
        <a href="javascript:;" class="weui-btn weui-btn_mini weui-btn_primary Login" style="float: right;margin-top: 0;background: #28c81e;width: 100%;">登录</a>
    </div>
</body>
<script type="text/javascript">
    $(document).ready(function() {
		var a = localStorage.getItem("accountNumber")
		var b = localStorage.getItem("passWord")
		$(".accountNumber").val(a)
		$(".passWord").val(b)
        $(".Login").on("click", function() { //点击登录
            var accountNumber = $(".accountNumber").val(); //账号
            var passWord = $(".passWord").val(); //密码
            if (!accountNumber || !passWord) {
                $.toptip('账号或密码不能为空', 1200, 'error');
            } else if(accountNumber!= 'admin'){
               $.toptip('账号不存在',1200,'error');
            }else if(passWord!=123456){
            	 $.toptip('密码错误',1200,'error');
            }else{
            	localStorage.setItem("accountNumber",accountNumber)
            	localStorage.setItem("passWord",passWord)
            	location.href = "index.html"
            }
        })
    })
</script>

</html>